﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddResourceInfo.aspx.cs"
    Inherits="sysadmin_CourseManager_AddResourceInfo" ValidateRequest="False" %>

<%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>添加上传资源</title>
    <link href="../../css/1/css/css.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" language="javascript">
        function ShowNo()                        //隐藏两个层
        {
            document.getElementById("doing").style.display="none";
            document.getElementById("divLogin").style.display="none";
        }
        function $(id)         
        {
            return (document.getElementById) ? document.getElementById(id) : document.all[id] ;
        }
        function showFloat()                    //根据屏幕的大小显示两个层
        {
            var range = getRange();
            $('doing').style.width = range.width + "px";
            $('doing').style.height = range.height + "px";
            $('doing').style.display = "block";
            document.getElementById("divLogin").style.display="";
        }
        function getRange()                      //得到屏幕的大小
        {
              var top     = document.body.scrollTop;
              var left    = document.body.scrollLeft;
              var height  = document.body.clientHeight;
              var width   = document.body.clientWidth;

              if (top==0 && left==0 && height==0 && width==0) 
              {
                top     = document.documentElement.scrollTop;
                left    = document.documentElement.scrollLeft;
                height  = document.documentElement.clientHeight;
                width   = document.documentElement.clientWidth;
              }
              return  {top:top  ,left:left ,height:height ,width:width } ;
        } 

    </script>

</head>
<body class="bodymain" style="background-color: #ffffff">
    <form id="form1" runat="server">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tree-titbg_right">
            <tr>
                <td class="tree-titbg_left">
                    <asp:Label ID="lbl_InfoTitle_AddVirtual" runat="server" Text=""></asp:Label>
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableList2"
            style="border-bottom-style: none;">
            <tr>
                <th>
                    <asp:Label ID="lbl_ResourceName" runat="server" Text=""></asp:Label></th>
                <td style="width: 199px">
                    <input type="text" name="txt_ResourceName" id="txt_ResourceName" runat="server" style="width: 170px"
                        maxlength="256" /><span style="color: #ff0033;">*</span><asp:RequiredFieldValidator
                            ID="rfv_txt_ResourceName" runat="server" ErrorMessage="" ControlToValidate="txt_ResourceName"></asp:RequiredFieldValidator>
                    <asp:Label ID="lbl_addresourceinfo_msg_resourcename" runat="server" Text="" ForeColor="Red"></asp:Label></td>
                <th>
                   <asp:Label ID="lbl_CourseName" runat="server" Text=""></asp:Label>
                    </th>
                <td>
                 <asp:Label ID="lab_CourseName" runat="server" Text="所属课程"></asp:Label>
                    
                </td>
            </tr>
            <tr>
                <th> <asp:Label ID="lbl_CoursersRestpID" runat="server" Text=""></asp:Label>
                    </th>
                <td style="width: 199px">
                   <asp:DropDownList ID="ddl_CoursersRestpID" runat="server" EnableTheming="False"  OnSelectedIndexChanged="ddl_CoursersRestpID_SelectedIndexChanged"  AutoPostBack="True">
                    </asp:DropDownList>
                    <asp:Label ID="lbl_addresourceinfo_msg_courseesrestpid" runat="server" Text="" ForeColor="Red"></asp:Label>
                    <%--<input id="Button3" type="button" value='<%=GetLanageValueByKey("AddResourceInfo_btn_t1", PowerCreator.LMS.Language.LanagetItemType.Page)%>'
                        class="inputBotton2" onclick="showFloat();" />--%></td>
                <th><asp:Label ID="lbl_ResourceClass" runat="server" Text=""></asp:Label>
                   </th>
                <td><asp:DropDownList ID="ddl_ResourceClass" runat="server" Width="190px">
                    </asp:DropDownList>
                    </td>
            </tr>
            <tr>
                <th>
                    <asp:Label ID="lbl_AuthorName" runat="server" Text=""></asp:Label></th>
                <td style="width: 199px">
                    <input type="text" name="txt_AuthorName" id="txt_AuthorName" runat="server" maxlength="100"
                        style="width: 170px" />
                </td>
                <th> <asp:Label ID="lbl_VideoTime" runat="server" Text=""></asp:Label>
                   </th>
                <td><input type="text" name="txt_VideoTime" id="txt_VideoTime" runat="server" value="00:01:00"
                        style="width: 185px" /><asp:Label ID="lbl_vt_format" runat="server" Text=""></asp:Label>
                    </td>
            </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableList3">
            <tr>
                <th valign="top">
                    &nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="lbl_Remark" runat="server" Text=""></asp:Label>
                </th>
                <td colspan="3">
                    <FTB:FreeTextBox ID="FreeTextBox1" runat="server" EnableHtmlMode="false" Width="600px"
                        AllowHtmlMode="false" ToolbarStyleConfiguration="Office2003" Height="300px" Language=""
                        ToolbarLayout="ParagraphMenu,FontFacesMenu,FontSizesMenu,FontForeColorsMenu,FontForeColorPicker,FontBackColorsMenu,FontBackColorPicker|Bold,Italic,Underline,Strikethrough,Superscript,Subscript,RemoveFormat|JustifyLeft,JustifyRight,JustifyCenter,JustifyFull;BulletedList,NumberedList,Indent,Outdent;CreateLink,Unlink,InsertImage|Cut,Copy,Paste,Delete;Undo,Redo,Print,Save|SymbolsMenu,StylesMenu,InsertHtmlMenu|InsertRule,InsertDate,InsertTime|InsertTable,EditTable;InsertTableRowAfter,InsertTableRowBefore,DeleteTableRow;InsertTableColumnAfter,InsertTableColumnBefore,DeleteTableColumn|InsertForm,InsertTextBox,InsertTextArea,InsertRadioButton,InsertCheckBox,InsertDropDownList,InsertButton|InsertDiv,EditStyle,InsertImageFromGallery,Preview,SelectAll,WordClean,NetSpell">
                    </FTB:FreeTextBox>
                </td>
            </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableList2">
            <tr runat="server" id="tr_1">
                <td colspan="4" class="titlefont">
                    <asp:Label ID="lbl_advert" runat="server" Text=""></asp:Label>
                    <span style="color: Gray; font-weight: normal;">
                        <asp:Label ID="lbl_advert_English" runat="server" Text=""></asp:Label></span></td>
            </tr>
            <tr runat="server" id="tr_2">
                <th>
                    <asp:Label ID="lbl_Url" runat="server" Text=""></asp:Label></th>
                <td colspan="3">
                    <input type="text" name="txt_Url" id="txt_Url" runat="server" style="width: 500px" /><span
                        style="color: #ff0033;">*</span>&nbsp;
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage=""
                        ControlToValidate="txt_Url"></asp:RequiredFieldValidator><br />
                    <asp:Label ID="lbl_advert_url" runat="server" Text=""></asp:Label></td>
            </tr>
            <tr runat="server" id="tr_3">
                <th>
                    <asp:Label ID="lbl_EntryFileName" runat="server" Text=""></asp:Label></th>
                <td colspan="3">
                    <input type="text" name="txt_EntryFileName" id="txt_EntryFileName" runat="server"
                        style="width: 418px" /><span style="color: #ff0033;">*</span>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage=""
                        ControlToValidate="txt_EntryFileName"></asp:RequiredFieldValidator>
                    <input type="button" value="" id="btnTest" name="btnTest" class="inputBotton2" onserverclick="btnTest_ServerClick"
                        runat="server" CausesValidation="false" />
                    <asp:Button ID="btnPreview" runat="server" CssClass="inputBotton2" OnClick="btnPreview_Click"
                        Text="" CausesValidation="False" />
                    <asp:Label ID="lbl_addressourceinfo_filepath" runat="server" Text="" ForeColor="Red"></asp:Label><br />
                    <asp:Label ID="lbl_advert_htm" runat="server" Text=""></asp:Label></td>
            </tr>
            <tr>
                <td colspan="4" class="tree-bottom-bg">
                    <input type="button" value="" id="btn_Save" name="btnSave" class="inputBotton2" runat="server"
                        onserverclick="btn_Save_ServerClick" />
                    <asp:Button ID="btn_Reset" runat="server" CssClass="inputBotton2" OnClick="btnReset_Click"
                        Text="" CausesValidation="False" /></td>
            </tr>
        </table>
        <br />
        <div id="doing" style="filter: alpha(opacity=30); -moz-opacity: 0.3; opacity:0.3;
            background-color: #000; width: 100%; height: 100%; z-index: 1000; position: absolute;
            left: 0; top: 0; display: none; overflow: hidden;">
        </div>
        <div id="divLogin" style="border: solid 10px #898989; background: #fff; padding: 10px;
            width: 780px; z-index: 1001; position: absolute; display: none; top: 62%; left: 45%;
            margin: -200px 0 0 -400px;">
            <div style="padding: 3px 15px 3px 15px; text-align: left; vertical-align: middle;">
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tree-titbg_right">
                    <tr>
                        <td class="tree-titbg_left">
                            <asp:Label ID="lbl_InfoTitle" runat="server" Text=""></asp:Label>
                        </td>
                    </tr>
                </table>
                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableList2">
                    <tr>
                        <td style="width:50%; vertical-align:top;">
                            <asp:Repeater ID="rpt_RestpName" runat="server" OnItemCommand="rpt_RestpName_ItemCommand" >
                                <HeaderTemplate>
                                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="mainList2">
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td>
                                            <%#Eval("Text")%>
                                            &nbsp;
                                        </td>
                                        <td>
                                            <asp:Label ID="lblCatalogID" Text='<%#Eval("Value")%>' runat="Server" Visible="false"></asp:Label>
                                            <asp:Button ID="btn_Add" runat="server" Text="添加" CommandName="btnadd" CommandArgument='<%#Eval("Value")%>' CausesValidation="False"
                                                CssClass="inputBotton2" />
                                            <asp:Button ID="btn_Editor" runat="server" Text="编辑" CommandName="btnedit" CommandArgument='<%#Eval("Value")%>'  CausesValidation="False"
                                                CssClass="inputBotton2" />
                                            <asp:Button ID="Button1" runat="server" Text="删除" CommandName="btndel" CommandArgument='<%#Eval("Value")%>'  CausesValidation="False"
                                                CssClass="inputBotton2" />
                                            <asp:Label ID="lbl_msg_description" runat="server" Text="" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    </table>
                                </FooterTemplate>
                            </asp:Repeater>
                        </td>
                        <td>
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableList2">
                                <tr>
                                    <th><asp:Label ID="lbl_CourseResourceType1" runat="server" Text=""></asp:Label></th>
                                    <td>
                                        <asp:DropDownList ID="ddl_ResourceType" runat="server">
                                        </asp:DropDownList></td>
                                </tr>
                                <tr>
                                    <th>
                                        <asp:Label ID="lbl_CourseResourceType" runat="server" Text=""></asp:Label></th>
                                    <td>
                                        <input type="text" name="txt_CourseResourceType" id="txt_CourseResourceType" runat="server"
                                            maxlength="128" />
                                        <br />
                                        <asp:Label ID="lbl_addcourseresourcetype_msg_courseresourcetypename" runat="server"
                                            Text="" ForeColor="Red"></asp:Label></td>
                                </tr>
                                <tr>
                                    <td colspan="2" class="tree-bottom-bg">
                                        <asp:Button ID="btn_addresourcetype" runat="server" Text="" CssClass="inputBotton2"
                                            OnClick="btn_addresourcetype_Click" CausesValidation="False" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" class="tree-bottom-bg">
                        <input id="btn_colse" type="button" value='<%=GetLanageValueByKey("btn_Colse", PowerCreator.LMS.Language.LanagetItemType.Page)%>'
                                            class="inputBotton2" onclick="ShowNo()" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </form>
</body>
</html>
